package com.tjhzzx.hnceCore2024.model.energy;

import com.tjhzzx.hnceCore2024.enums.BModuleType;
import com.tjhzzx.hnceCore2024.model.common.BCommonModule;
import com.tjhzzx.hnceCore2024.model.ext.BTreeMenuRoot;

import javax.baja.sys.Flags;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;

/**
 * @author Luc
 * @version 1.0
 * @date 2022-09-21 9:23
 */
public class BEnergySettingModule extends BCommonModule {
    public BEnergySettingModule() {
        String title = "能效设置";
        String nIcon = "setting";
        String pagePath = "/EnergySettingModule";
        setTitle(title);
        setNIcon(nIcon);
        setModuleType(BModuleType.treeMenu);
        setPagePath(pagePath);
        BTreeMenuRoot treeMenuRoot = new BTreeMenuRoot();
        BEnergySettingTreeMenuItem energySettingTreeMenuItem = new BEnergySettingTreeMenuItem();
        treeMenuRoot.add("energySettingTreeMenuItem", energySettingTreeMenuItem);
        setTreeMenuRoot(treeMenuRoot);
        this.setFlags(this.getSlot("moduleType"), Flags.READONLY);
        this.setFlags(this.getSlot("dashboardRoot"), Flags.READONLY);
        this.setFlags(this.getSlot("treeMenuRoot"), Flags.READONLY);
    }

    @Override
    public Type getType() {
        return TYPE;
    }

    public static final Type TYPE = Sys.loadType(BEnergySettingModule.class);
}
